package edu.cmu.lti.ritesdk.sample;

import edu.cmu.lti.ritesdk.AbstractRiteSystem;
import edu.cmu.lti.ritesdk.AnalyzedTextPair;
import edu.cmu.lti.ritesdk.TextPair;

/**
 * Toy implementation that randomly returns labels 
 * without taking into account label distribution.
 * 
 * @author Hideki Shima
 *
 */
public class RandomMCSystem extends AbstractRiteSystem {

  @Override
  public AnalyzedTextPair run(TextPair t) {
    double rand = Math.random();
    String systemLabel;
    if (rand<0.2D) {
      systemLabel = "F";
    } else if (0.2D<=rand && rand<0.4D) {
      systemLabel = "R";
    } else if (0.4D<=rand && rand<0.6D) {
      systemLabel = "B";
    } else if (0.6D<=rand && rand<0.8D) {
      systemLabel = "I";
    } else {
      systemLabel = "C";
    }
    AnalyzedTextPair result = new AnalyzedTextPair( t, systemLabel, rand );
    return result;
  }

}
